#ifndef __CALYPSO_INS_H__
#define __CALYPSO_INS_H__

#include "calypso_api_i.h"

BOOL get_datetime(DATETIME_ST *dst);
BOOL set_datetime(DATETIME_ST *src);
BOOL is_date_valid(DATETIME_ST *src);
BOOL is_time_valid(DATETIME_ST *src);
BOOL is_datetime_valid(DATETIME_ST *src);
void datetime_next_day(DATETIME_ST *dt);
void datetime_prev_day(DATETIME_ST *dt);
BOOL datetime_next_second(DATETIME_ST *dt);

BOOL CalypsoGetCurrentTimestamp(DATETIME_ST *dst);


BOOL CalypsoIsTimestampValid(DATETIME_ST *timestamp);
BOOL CalypsoIsDateValid(DATETIME_ST *timestamp);
BOOL CalypsoIsTimeValid(DATETIME_ST *timestamp);

WORD CalypsoTimestampToDate14(const DATETIME_ST *src);
WORD CalypsoTimestampToTime11(const DATETIME_ST *src);


BOOL CalypsoDate14IsBefore(const DATETIME_ST *now, WORD value);
BOOL CalypsoDate14IsAfter(const DATETIME_ST *now, WORD value);

#endif
